package com.training.java.core.collections.car.post15;

import java.util.ArrayList;
import java.util.List;

public class LaptopListDemo {

	public static void main(String[] args) {
		Laptop laptop1= new Laptop("Hp","pavillion","intel core");
        Laptop laptop2= new Laptop("Dell","inspiron","Quad core");
        Laptop laptop3= new Laptop("Acer","aspire","Dual core");
        Laptop laptop4= new Laptop();
       

        laptop1.setOperatingSystem("windows");
        laptop2.setOperatingSystem("Linux");
        laptop3.setOperatingSystem("Mac");
       
       
        List<Laptop> listOfLaptops = new ArrayList<Laptop>();
       
        listOfLaptops.add(laptop2);
        listOfLaptops.add(laptop1);
        listOfLaptops.add(laptop3);
        listOfLaptops.add(laptop3);
        listOfLaptops.add(laptop4);
       
       
        for(Laptop aLaptop : listOfLaptops)
        {
                System.out.println("company: "+ aLaptop.getCompany() );
                System.out.println("model: "+ aLaptop.getModel() );
                System.out.println("processor: "+ aLaptop.getProecessor());
                System.out.println("OS: "+ aLaptop.getOperatingSystem());
                System.out.println("*************************" );
        }
        

	}

}
